<!--
 * @Author: MrLee
 * @Date: 2024-08-24 10:19:44
 * @LastEditors: MrLee
 * @LastEditTime: 2024-08-25 12:31:31
 * @Description: 请填写简介
-->
<template>
  <custom-navbar title="身份认证" :autoBack="true" leftIconColor="#303133" />
  <up-gap height="30rpx" />
  <view class="bg-#f6f7f8 px-22rpx">
    <view
      v-for="(item, index) in list"
      :key="index"
      class="job-item mb-32rpx bg-#fff flex items-start px-40rpx py-24rpx shadow-[0px_6px_16px_0px_rgba(191,191,191,0.26)] rounded-[20rpx]"
    >
      <view class="relative mr-[20rpx]">
        <image
          src="https://yiliao.test03.qcw800.com/static/images/tab/user-01.png"
          class="block h-[20rpx] w-[20rpx] absolute rigth-0 bottom-[5rpx]"
          style="right: 0"
        />
        <image class="w-72rpx h-72rpx rounded-[50%]" :src="item.headerUrl" />
      </view>
      <view class="flex flex-col justify-center">
        <view class="mb-14rpx flex items-center justify-between">
          <view class="text-left text-[32rpx] text-[#1d2129]">
            {{ item.name }}
          </view>
        </view>
        <view class="flex items-center text-left text-[26rpx] text-[#6e6d72]">
          <view
            v-for="(itemTab, indexTab) in item.tabs"
            :key="indexTab"
            class="flex items-center justify-center"
          >
            <view class="text-[24rpx] font-medium text-[#999999] ">{{ itemTab.label }}</view>
            <view
              v-if="indexTab != item.tabs.length - 1"
              class="mx-20rpx h-28rpx w-2rpx bg-#6e6d72"
            />
          </view>
        </view>
        <view class="text-[24rpx] font-medium text-[#999999] my-[16rpx]">{{ item.statusLabel }}:{{ item.statusValue }}</view>
      <view class="flex">
        <view class="bg-#f5f6fa text-[24rpx] font-normal text-[#4e5969] px-[20rpx] py-[6rpx] rounded-[24rpx]"  v-for="(itemTag, indexTag) in item.tags" :key="indexTag">{{ itemTag }}</view>
      </view>
      </view>
    </view>
  </view>
</template>
  <script setup lang="ts">
import Tabbar from "@/pages/components/tabbar/index.vue";
import { userUserInfo } from "@/api/user";

// import userCatch01 from "@/static/images/tab/user-header.png";
const userCatch01  = 'https://yiliao.test03.qcw800.com/static/images/tab/user-header.png'
let list:any = reactive([

]);

const tabChange = (e) => {
  activeTab.value = e.index;
};
const userInfo = ref({
  school_name: '',
  school_avatar: '',
  college_name: '',
  majors_name: '',
  name: '',
  avatar: ''
});
const getUserInfo = async () => {
  try {
    const r:any = await userUserInfo();
    console.log("我的-身份认证", r);
    list.push({
        name: r.education_last.school_name,
        headerUrl: r.education_last.school.avatar,
        tabs: [
          {
            label: r.education_last.college_name,
            ico: "icon-a-zu121328_1",
          },
          {
            label: r.education_last.majors_name,
            ico: "icon-a-zu121326_1",
          }
        ],
        statusLabel:'认证状态',
        statusValue:'已认证',
        tags:['学校认证']
      });
    list.push({
      name: r.name,
      headerUrl: r.avatar,
      tabs: [
        {
          label: "通过了姓名手机号比对",
          ico: "icon-a-zu121328_1",
        }
      ],
      statusLabel:'认证状态',
      statusValue:'已认证',
    });
  } catch (e) {
    console.log(e);
  }
};
onLoad(()=> {
  getUserInfo();
})
</script>
